<?php
/**
 * CK框架 查询失败异常类
 * @author wujibing<283109896@qq.com>
 * @version   3.0
 * @category   CkFrameWork
 * @package  CkFrameWork
 * @subpackage exception
 */
class queryFaild_sql_Exception extends Exception
{
    /**
     * 查询语句
     * @var string
     */
    private $sql;
    /**
     * 查询错误原因
     * @var string
     */
    private $error;
    /**
     * 查询错误号
     * @var int
     */
    private $errorNum;
    public function __construct($dbType,$sql, $error,$errorNum)
    {
        $this->sql = $sql;
        $this->error = $error;
        $this->errorNum = $errorNum;
        parent::__construct($dbType.'错误');
    }
    public function __toString()
    {
        return '查询SQL语句：'.$this->sql.'失败;<br>失败原因：'.$this->error.'<br>错误号：'.$this->errorNum;
    }
}